<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>Rotaract DLSU</title>
        <meta http-equiv="Content-Type" content="text/html"/>
        <meta name="robots" content="index,follow"/>
        <meta name="distribution" content="global"/>
        <meta name="description" content=""/>
        <meta name="keywords" content=""/>
        <link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
        <link rel="stylesheet" href="css/jquery-ui-1.8.21.custom.css"/>
        <link rel="stylesheet" href="css/demos.css"/>
        <script src="js/jquery-1.7.2.min.js"></script>
        <script src="js/jquery.ui.core.js"></script>
        <script src="js/jquery.ui.widget.js"></script>
        <script src="js/jquery.ui.datepicker.js"></script>
        <script type="text/javascript" src="javascript/RegistrationValidation.js"></script> 
        <script>
            
//            datepicker
            $(function() {
                $( "#datepicker" ).datepicker({
                    changeMonth: true,
                    changeYear: true,
                    dateFormat: 'yy-mm-dd'
                });
            });
        </script>

    </head>
    <body>
        <div id="container2">
            <div id="main2">
                <table width="100%" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="main_nav">
                            <div id="main_text2">

                                <center>
                                    <h2>Add an Agenda</h2>
                                    <br/>
                                    <br/>
<!--For Agenda Table-->
                                    <form enctype = "multipart/form-data" action="RAC-addAgendaUI.php" method="POST">

                                        <table border ="1" cellpadding="10" class="myTable">
                                            <tr>
                                                <td><b>Place of Agenda</b></td>
                                                <td><input type="text" name="placeAgenda"/><label id="errorplace"></label></td>
                                            </tr> 
                                            <tr>
                                                <td><b>Date of Agenda</b></td>
                                                <td><input type="text" name="dateAgenda" id="datepicker"/><label id="errordate"></label></td>
                                            </tr>
                                            <tr>
                                                <td><b>Start Time of Agenda</b></td>
                                                <td><input type="text" name="sTimeAgenda"/><label id="errorsTime"></label></td>
                                            </tr>
                                            <tr>
                                                <td><b>End Time of Agenda</b></td>
                                                <td><input type="text" name="eTimeAgenda"/><label id="erroreTime"></label></td>
                                            </tr>
                                            <tr>
                                                <td><b>Description</b></td>
                                                <td><input type="text" name="descAgenda"/><label id="errordesc"></label></td>
                                            </tr>

                                        </table>
                                        <br/>
                                        <br/>
                                        <input type="submit" name="submit" value="Save" onClick="return validateAddAge(this.form);"/>
                                    </form>
                                    <?php

                                            $confirm = '';
                                            if (isset($_POST['submit'])){
                                            include 'RAC-addAgenda.php';

                                            if($confirm){
                                                echo "<h4>Addition Successful!</h4>";
                                            }
                                            else
                                                echo "<h4>Agenda already exists!</h4>";
                                            }
                                    ?>
                                </center>
                            </div>
                        </td>

                    </tr>
                </table>
            </div>
        </div>
    </body>
</html>